package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysRegUser;
import com.tsd.system.entity.SysRegUserExt;
import com.tsd.system.entity.SysUserExt;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysRegUser服务实现层接口
 *
 * @author Hillpool
 * @date 2022/02/14 15:16:32
 */
public interface SysRegUserService {

    /**
     * 描述：根据id获取SysRegUser
     *
     * @param id
     */
    SysRegUser getSysRegUserById(Long id) throws Exception;

    /**
     * 描述：根据sid获取SysRegUser
     *
     * @param sid
     */
    SysRegUserExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据id删除SysRegUser
     *
     * @param id
     */
    void deleteSysRegUser(Long id, SysUserExt opUser) throws Exception;

    void deleteSysRegUsers(List<String> sids, SysUserExt opUser) throws Exception;

    /**
     * 描述：保存或更新SysRegUser
     *
     * @param record
     * @param opUser
     */
    void saveSysRegUser(SysRegUserExt record, SysUserExt opUser) throws Exception;

    void saveSysRegUser4Anon(SysRegUserExt userExt, SysUserExt opUser) throws Exception;

    /**
     * 描述：根据params分页查询SysRegUser
     *
     * @param params
     * @param page
     */
    List<SysRegUserExt> findSysRegUsers(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询SysRegUser
     *
     * @param params
     */
    List<SysRegUserExt> findSysRegUsers(Map<String, Object> params) throws Exception;

    SysRegUserExt queryValidByOpenId(String openId) throws Exception;

    SysRegUserExt queryValidByUnionId(String unionId) throws Exception;

    SysRegUserExt queryValidByUnionIdOrOpenId(String unionId, String openId) throws Exception;

    SysRegUserExt regUserLogin(Map<String, Object> map) throws Exception;

    void changeRegUserPwd(Map<String, Object> map, SysUserExt opUser) throws Exception;

    SysRegUserExt getSysRegUserByMobile(String mobile) throws Exception;
}
